import {
  ADD,
  MINUS,
  FIXED,
  UNFIXED,
  UNSCROLL,
  SCROLL,
  SIGN,
  SIGNED,
  USER,
  USERED
} from '../constants/counter'

export const add = () => {
  return {
    type: ADD
  }
}
export const minus = () => {
  return {
    type: MINUS
  }
}
export const fixed = () => {
  return {
    type: FIXED,
  }
}
export const unfixed = () => {
  return {
    type: UNFIXED,
  }
}
export const scroll = () => {
  return {
    type: SCROLL,
  }
}
export const unscroll = () => {
  return {
    type: UNSCROLL,
  }
}
export const sign = ()=>{
  return {
    type:SIGN,
  }
}
export const signed = ()=>{
  return {
    type:SIGNED,
  }
}
export const user = ()=>{
  return {
    type:USER,
  }
}
export const usered = ()=>{
  return {
    type:USERED,
  }
}


// 异步的action
export function asyncAdd () {
  return dispatch => {
    setTimeout(() => {
      dispatch(add())
    }, 2000)
  }
}
